package com.zhuiYun.project.api.order.service;

import com.alipay.api.AlipayApiException;
import com.zhuiYun.project.api.alipay.entity.AlipayEntity;
import com.zhuiYun.project.api.order.entity.OrderVO;
import com.zhuiYun.project.api.order.entity.OrdersAfterSales;
import com.zhuiYun.project.api.order.entity.SubmitOrderVo;
import com.zhuiYun.project.api.order.entity.*;
import com.zhuiYun.project.common.errorCode.CommonException;
import com.zhuiYun.project.common.response.CommonResult;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @ClassName OrderService
 * @Description TODO 订单后台接口
 * @Author lzy
 * @Date 2023/4/3 10:07
 **/
public interface OrderService {




    /**
     * @Author gpd
     * @Description 查询用户所有的订单信息
     * @Date 2023-04-04 上午 09:17
     * @Return  CommonResult
     * @param userId
     */
    List<OrderVO> getMyAllOrder(Integer userId);

    /**
     * @Author gpd
     * @Description 搜索查询用户订单信息（用于uniapp我的订单搜索栏）
     * @Date 2023-04-06 下午 08:56
     * @Return CommonResult
     * @param userId
     * @param myOrderValue
     */
     CommonResult getSelectOrderList(String myOrderValue,Integer userId);

     /**
     * @Description 用户提交订单
     * @Author lzy
     * @Date 2023/4/7 9:38
     * @Return com.zhuiYun.project.common.response.CommonResult
     * @param submitOrderVo
     */
    CommonResult submitCommodityOrder(SubmitOrderVo submitOrderVo) throws CommonException;


    /**
     * @Author gpd
     * @Description 查询点击状态的订单信息（用于我的订单中订单状态栏）
     * @Date 2023-04-07 上午 09:41
     * @Return CommonResult
     * @param userId
     * @param status
     */
    CommonResult getStatusToOrder(Integer status,Integer userId);

    /**
        * @Author yuanb 查询用户订单商品详情信息(用于pc端订单详细详细查询)
        * @Description
        * @Date 2023/4/9 15:57
        * @Return com.zhuiYun.project.common.response.CommonResult
        * * @param userId
    */
    List<OrderVO> getInformation(Integer userId,Integer id);
    /**
     * @Author yuanb 查询用户订单diy详情信息(用于pc端订单详细详细查询)
     * @Description
     * @Date 2023/4/9 15:57
     * @Return com.zhuiYun.project.common.response.CommonResult
     * * @param userId
     */
    List<OrderVO> getDiyInformation(Integer userId, Integer id);

    /**
     * @Author yuanb 查询用户订单步骤详情信息(用于pc端订单详细详细查询)
     * @Description
     * @Date 2023/4/9 15:57
     * @Return com.zhuiYun.project.common.response.CommonResult
     *  @param userId
     *  @param id
     */
    CommonResult getStepList(Integer userId, Integer id);

    /**
        * @Author yuanb
        * @Description 获取售后列表(pc端)
        * @Date 2023/4/11 16:40
        * @Return com.zhuiYun.project.common.response.CommonResult
        * * @param userId
    */
    CommonResult getAfterSalesList(Integer userId);

    /**
    * @Description 询问当前订单状态
    * @Author lzy
    * @Date 2023/4/12 15:54
    * @Return com.zhuiYun.project.common.response.CommonResult
    * @param alipayEntity
    */
    CommonResult getDiyOrderQuery(AlipayEntity alipayEntity) throws CommonException, AlipayApiException;

    /**
    * @Description 订单过期未支付，执行订单回滚操作
    * @Author lzy
    * @Date 2023/4/12 16:30
    * @Return void
    * @param orderNumber
    */
    CommonResult diyOrderRollBack(String orderNumber) throws CommonException;


    /**
     * @Description 商品订单过期未支付，执行订单回滚操作
     * @Author lzy
     * @Date 2023/4/12 16:30
     * @Return void
     * @param orderNumber
     */
    CommonResult commodityOrderRollBack(String orderNumber) throws CommonException;

     /** @Author yuanb
     * @Description 添加售后列表(pc端)
     * @Date 2023/4/11 16:38
     * @Return com.zhuiYun.project.common.response.CommonResult
     * * @param orderVO
     */
    CommonResult AfterSalesList(OrdersAfterSales OrdersAfterSales , MultipartFile file);

    /**
     * @Author yuanb
     * @Description 修改售后列表信息(pc端)
     * @Date 2023/4/11 16:40
     * @Return com.zhuiYun.project.common.response.CommonResult
     * * @param ordersRetreat
     */
    CommonResult updateOrder(Integer id);

    /**
        * @Author yuanb
        * @Description 查询订单支付状态
        * @Date 2023/4/16 19:13
        * @Return com.zhuiYun.project.common.response.CommonResult
        * * @param id
    */
    CommonResult getId(Integer id);

    /**
    * @Description 取消diy订单
    * @Author lzy
    * @Date 2023/4/17 19:06
    * @Return com.zhuiYun.project.common.response.CommonResult
    * @param orderId
    */
    CommonResult cancelDiyOrder(Integer orderId) throws CommonException;

    /**
     *
     * @author: HKY
     * @date: 2023/4/24 13:50
     * @param orderId
     * @return com.zhuiYun.project.common.response.CommonResult
     * @Description: 取消商品订单
     */
    CommonResult cancelCommodityOrder(Integer orderId) throws CommonException;

    /**
        * @Author yuanb
        * @Description pc端我的订单获取用户所有订单的方法
        * @Date 2023/4/16 19:13
        * @Return com.zhuiYun.project.common.response.CommonResult
        * @param userId
    */
     List<OrdersVo>getMyAllOrderPc(Integer userId);

    /**
        * @Author yuanb
        * @Description 查询点击状态的订单信息（用于我的订单中订单状态栏）
        * @Date 2023/4/19 9:41
        * @Return com.zhuiYun.project.common.response.CommonResult
        * @param status
        * @param userId
    */
    CommonResult getStatusToOrderPc(Integer status, Integer userId);

    /**
    * @Description 提交diy商品订单
    * @Author lzy
    * @Date 2023/4/19 11:25
    * @Return com.zhuiYun.project.common.response.CommonResult
    * @param submitOrderVo
    */
    CommonResult submitHandDiyOrder(SubmitOrderVo submitOrderVo);
}
